import * as THREE from 'three';
export default class CamControl{

    constructor() {
        console.log('照相机类')
        // Default options
        this.options = {
            fov: 45,
            distance: 400,
            distRange: {
                max: Number.POSITIVE_INFINITY,
                min: Number.NEGATIVE_INFINITY
            },
            rotation: new THREE.Vector3(),
            
        };
        let vpW = window.innerWidth;
        let vpH = window.innerHeight;
        this.camera = new THREE.PerspectiveCamera(this.options.fov, vpW / vpH, 0.1, 10000);
       
    }

    /////////////////////////////////////// DOM EVENTS ///////////////////////////////////////
    // Window resize triggered
    onWindowResize (vpW, vpH) {
        this.camera.aspect = vpW / vpH;
        this.camera.updateProjectionMatrix();
    };
    
    /////////////////////////////////////// UTILS ///////////////////////////////////////
    // Called once per frame
    update () {
       
    };
    follow () {
       
    };
    
}